#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    float ipr=.004/4,cf=.03/4;    //if after running the model there is no change in susceptible pop then these values shuold be raised
    int tp,sp[150],ip[150];
    float ir[150];
    
    int i,j;
    printf("\nEnter the total pop : ");
    scanf("%d",&tp);
    printf("\nenter the initial infected people : ");
    scanf("%d",&ip[0]);
    sp[0]=tp-ip[0];
    
    for(i=0;i<125;i++) //this loop is for day wise execution of the model
    {                 
                  
                      if(sp[i]>0)  //condition check for +susceptible population
                      {
                      ip[i+1]=ip[i]+ipr*cf*ip[i]*sp[i];  //adding the new infected people to the population of infected people
                      sp[i+1]=tp-ip[i+1];                //susceptible population = total pop-infected people pop
                      ir[i]=ipr*cf*sp[i]*ip[i];         //newly infected people
                      printf("\ninfected people ,new infp and susc pop after day %d =  %d, %f ,%d",i,ip[i+1],ir[i],sp[i+1]); //displaying the infected people pop,no. of newly added infected people and suceptible pop after day i
                      }
                      else
                      {
                          i=125;
                      }
    }
  
  system("PAUSE");	
  return 0;
}
___________________________________________________________________________________________
Input Format
*RR->Recommended range
Enter the initial poplation :        \\RR 15000-20000
Enter the initial infected people :    \\RR 12-14
--------------------------------------------------------------------------------------------------------------------------------
Output
Day wise execution of model showing infected people,susceptible population,new infected people
____________________________________________________________________________________________

Output is displayed quarter day wise